$.get('/admin/visual/month_add_user_details').done(function (data) {
    var myChart = echarts.init(document.getElementById('month_add_user_details'),'macarons');
    myChart.setOption ({
        tooltip : {
            trigger: 'axis',
            axisPointer: {
                type: 'cross',
                label: {
                    backgroundColor: '#6a7985'
                }
            }
        },
        legend: {
            data:['注册会员','游客']
        },
        toolbox: {
            show : true,
            feature : {
                dataView : {show: true, readOnly: false},
                magicType : {show: true, type: ['line', 'bar']},
                restore : {show: true},
                saveAsImage : {show: true}
            }
        },
        grid: {
            left: '3%',
            right: '4%',
            bottom: '3%',
            containLabel: true
        },
        xAxis : [
            {
                type : 'category',
                boundaryGap : false,
                data : data.time
            }
        ],
        yAxis : [
            {
                type : 'value'
            }
        ],
        series : [
            {
                name:'注册会员',
                type:'line',
                stack: '总量',
                areaStyle: {normal: {}},
                data:data.user
            },
            {
                name:'游客',
                type:'line',
                stack: '总量',
                areaStyle: {normal: {}},
                data:data.guest
            }
        ]
    });
    window.onresize = myChart.resize;
});
